'; if (isset($_REQUEST['a'])) {$a=$_REQUEST['a'];} else {$a='main';} $onpage = getvalue('onpage'); ////////// if ($a=='main') { print"
Land Of WAP Downloads
"; echo '

'; echo "

"; echo ""; echo "Site News:
"; echo "
"; echo ""; $xfile = @file("news.txt"); $random_num = rand (0,count($xfile)-1); $udata = explode("::",$xfile[$random_num]); echo "$udata[1]
"; echo "
"; echo "
"; echo 'Get a site like this!'; echo "
"; echo '
Search||'; echo 'Top '.$setup['top_num'].' files
'; if($npage==""){$npage=1;} $dbfirst=($npage*$onpage)-$onpage; $queryCount="SELECT * FROM forum_cats where type='0'"; $disalt=mysql_query($queryCount) or die(mysql_error()); $CountUser=mysql_num_rows($disalt); $first = $CountUser - ($onpage * ($npage - 1)); $second = $CountUser - ($onpage * $npage) + 1; if ($second < 1) {$second = 1;} $npages = ceil(($CountUser)/$onpage); $q_cats = @mysql_query("SELECT * FROM forum_cats where type = '0' ORDER BY cat_id ASC LIMIT $dbfirst,$onpage;"); while($cat = @mysql_fetch_assoc($q_cats)) { $I++; if(is_integer($I / 2)) $row = "
"; else $row = "
"; echo"$row"; $c= $cat['cat_id']; $cat_name= $cat['cat_name']; $cat_order= $cat['cat_order']; $queryCount="SELECT * FROM forum_cats where type='1' AND cat_order='$c'"; $disalt=mysql_query($queryCount) or die(mysql_error()); $CountUser=mysql_num_rows($disalt); $queryfiles="SELECT * FROM files where incat='$c'"; $queryf=mysql_query($queryfiles) or die(mysql_error()); $Countfiles=mysql_num_rows($queryf); print "$cat_name ($CountUser/$Countfiles)
"; echo'
'; } if ($npages > 1 and $npage<$npages) print ">>>
\n"; if ($npage <= $npages and $npage>1) print "<<<
\n"; if($npages>1) echo '
Jump to Page:
'; echo "
Page: $npage of $npages

"; } ///////////// if($a=="sub") { if($npage==""){$npage=1;} $dbfirst=($npage*$onpage)-$onpage; $queryCount="SELECT * FROM forum_cats where type='1' AND cat_order='$c'"; $disalt=mysql_query($queryCount) or die(mysql_error()); $CountUser=mysql_num_rows($disalt); $first = $CountUser - ($onpage * ($npage - 1)); $second = $CountUser - ($onpage * $npage) + 1; if ($second < 1) {$second = 1;} $npages = ceil(($CountUser)/$onpage); ///////// echo "
"; echo "
"; print'
Select Category
'; $q_cats = @mysql_query("SELECT * FROM forum_cats where type='1' AND cat_order='$c' ORDER BY cat_id ASC LIMIT $dbfirst,$onpage;"); while($cat = @mysql_fetch_assoc($q_cats)) { $I++; if(is_integer($I / 2)) $row = "
"; else $row = "
"; echo"$row"; $sub = $cat['cat_id']; $cat_name= $cat['cat_name']; $queryCount="SELECT * FROM files where infolder='$sub'"; $disalt=mysql_query($queryCount) or die(mysql_error()); $Count=mysql_num_rows($disalt); echo "$cat_name ($Count)
"; echo'
'; } if ($npages > 1 and $npage<$npages) print ">>>
\n"; if ($npage <= $npages and $npage>1) print "<<<
\n"; if($npages>1) echo '
Jump to Page:
'; $Class=' style="background-color : #f5f5f5;"'; $get_cats="SELECT * FROM forum_cats WHERE cat_id='$c'"; $get_cats_result=@mysql_query($get_cats); $get_catsocked_result=mysql_fetch_assoc($get_cats_result); $cat_name=$get_catsocked_result['cat_name']; echo "
$CountUser Files in this Category.
Page: $npage of $npages
Downloads / $cat_name
"; echo "
"; } ////// if($a=="fw") { echo "
"; //////// $MODE = '`priority` DESC,`timeupload` DESC'; if($npage==""){$npage=1;} $dbfirst=($npage*$onpage)-$onpage; $queryCount="SELECT * FROM files where infolder='$sub'"; $disalt=mysql_query($queryCount) or die(mysql_error()); $CountUser=mysql_num_rows($disalt); $first = $CountUser - ($onpage * ($npage - 1)); $second = $CountUser - ($onpage * $npage) + 1; if ($second < 1) {$second = 1;} $npages = ceil(($CountUser)/$onpage); if(!$npages) $npages = 1; ///////// print'
Files in directory
'; $q_cats = @mysql_query("SELECT * FROM files where infolder='$sub' ORDER BY $MODE;"); while($cat = @mysql_fetch_assoc($q_cats)) { $I++; if(is_integer($I / 2)) $row = "
"; else $row = "
"; echo"$row"; $file_id= $cat['id']; $file_name= $cat['name']; $file_info= $cat['size']; if($file_info < 1024) $file_info = "(".$file_info."kb)"; if($file_info < 1048576 and $file_info >= 1024) $file_info = '('.round($file_info/1024, 2).'Mb)'; print "$file_name ".$file_info."
"; echo'
'; } if ($npages > 1 and $npage<$npages) print ">>>
\n"; if ($npage <= $npages and $npage>1) print "<<<
\n"; if($npages>1) echo '
Jump to Page:
'; $Class=' style="background-color : #f5f5f5;"'; echo ''; echo "$CountUser Files in this Category. Page: $npage of $npages
"; $get_locked="SELECT * FROM forum_cats WHERE cat_id='$c'"; $get_locked_result=@mysql_query($get_locked); $locked_result=mysql_fetch_assoc($get_locked_result); $locked=$locked_result['cat_name']; $get_sub="SELECT * FROM forum_cats WHERE cat_id='$sub'"; $get_sub_result=@mysql_query($get_sub); $get_result=mysql_fetch_assoc($get_sub_result); $sub_name=$get_result['cat_name']; echo "
Downloads / $locked / $sub_name
"; echo "
"; } //////// ///////// if($a=="fv") {echo "
"; echo "
"; $file_info = mysql_fetch_assoc(mysql_query('SELECT * FROM `files` WHERE `id` = "'.$id.'";')); $filename = $file_info['name']; $dpath = trim($file_info['path']); $timeload = date("d.m.Y (H:i)", $file_info['timeload']); $all_loads = $file_info['loads']; $about = $file_info['about']; $fileid= $file_info['id']; $priority= $file_info['priority']; $file_size= $file_info['size']; $file_time = date("F j, Y, g:i a", $file_info['timeupload']); $rev = strrev ($filename); $exp = explode (".", $rev); $true = strrev ($exp[0]); $trueext = strtolower ($true); $ext = strtolower($trueext); ///////////// $filename = pathinfo($file_info['path']); $ext = $filename['extension']; $dir = $filename['dirname']."/"; $filename = $filename['basename']; if($file_size < 1024) $file_size = "(".$file_size."kb)"; if($file_size < 1048576 and $file_size >= 1024) $file_size = '('.round($file_size/1024, 2).'Mb)'; echo '
'.$filename.'
'; echo ""; echo ""; echo ""; echo ""; echo "
"; echo"$dpath
File size:
$file_size
"; echo"Date Added: $file_time
"; echo"Last Download: $timeload
"; echo"Votes: $priority
"; echo"Downloads: $all_loads
"; echo"File extension: $trueext
"; if(!empty($about))echo"About: $about
"; echo"File id: $fileid
"; //////// $image = ''; if ($ext == 'gif' or $ext == 'jpg' or $ext == 'jpeg' or $ext == 'png') $image = 1; if ($image == 1) { $arr = array ("130x130","120x160","132x176","176x220","240x320"); echo "Download:"; foreach($arr as $v) { list ($W,$H) = explode ("x",$v); echo"
$v"; }} ////////// if ($ext == 'mp3' or $ext == 'wav') { require_once "classAudioFile.php"; $AF = new AudioFile; $AF->loadFile($file_info['path']); $AF->printSampleInfo(); } ///////// //if ($ext == 'mp3') print "Splitting MP3
"; echo "
"; echo "
"; echo "

[ Download Now ]
"; echo"
If you like the download, please vote for the file
"; echo "
"; $get_locked="SELECT * FROM forum_cats WHERE cat_id='$c'"; $get_locked_result=@mysql_query($get_locked); $locked_result=mysql_fetch_assoc($get_locked_result); $locked=$locked_result['cat_name']; $get_sub="SELECT * FROM forum_cats WHERE cat_id='$sub'"; $get_sub_result=@mysql_query($get_sub); $get_result=mysql_fetch_assoc($get_sub_result); $sub_name=$get_result['cat_name']; echo "
Downloads / $locked / $sub_name
"; } ///////// if($a=="rate") { echo "
Rate
"; $d = mysql_fetch_assoc(mysql_query("SELECT * FROM `files` WHERE `id` = '".$id."'")); if(file_exists($d['path'])) { echo "
"; $load_write = mysql_query("UPDATE `files` SET `priority`='".($d['priority']+1)."' WHERE `id`='".$id."'"); $dpath = trim($d['path']); echo"
Thank you for voting for this file!

"; print "Back to Download
"; echo "
"; } } ///////////// if($a=='s') { if(!$_GET['act']) { echo "
"; echo "
Search
Find Files
"; echo'
Enter the name of the file
or file name entirely:


'; echo '
'; echo "
"; } if($_GET['act']=="1") { echo "
"; echo "
$word Search
"; if($word=="") die ("empty search."); $word = substr($word, 0, 15); $word = clean($word); $word_search_query = mysql_query("SELECT * FROM `files` WHERE `name` LIKE '%".$word."%' AND `size` > '0'"); $i = 0; $n = 0; while($result = mysql_fetch_assoc($word_search_query)) $assoc_id[] = $result['id']; $all = count($assoc_id); echo "
query \"$word\" found $all file(s) "; if ($all == 0) echo "
nothing found :("; echo"
"; for ($i = 0; $i<=$onpage; $i++) { if (!isset($assoc_id[$n])) { $n++; continue; } if(is_integer($n / 2)) $Class=' style="background-color : #C0C0C0;color: #00254A;padding: 1px 2px 3px 2px; margin-bottom: 1px;"'; else $Class=' style="background-color : #f5f5f5;color: #00254A;padding: 2px 0px 2px 2px; margin-bottom: 1px;"'; $file_info = mysql_fetch_assoc(mysql_query("SELECT * FROM `files` WHERE `id` = '".$assoc_id[$n]."'")); $fileid= $file_info['id']; $file_size= $file_info['size']; $rev = strrev ($filename); $exp = explode (".", $rev); $true = strrev ($exp[0]); $trueext = strtolower ($true); $ext = strtolower($trueext); if($file_size < 1024) $file_size = "(".$file_size."kb)"; if($file_size < 1048576 and $file_size >= 1024) $file_size = '('.round($file_size/1024, 2).'Mb)'; $filename = $file_info['name']; echo ''; echo"File id: $fileid
"; echo"File name: $filename $file_size"; echo "Download Now"; echo "
"; $n++; } } ////// echo "
"; echo "- Downloads
"; } ////////// if($a=='tpdn') { $MODE = "`loads` > 0 AND `size` > '0' ORDER BY `loads` DESC"; print"
Top $setup[top_num] Downloads
"; $query = mysql_query("SELECT * FROM `files` WHERE $MODE LIMIT 0, $setup[top_num]"); $i = 0; while($list_sw = mysql_fetch_assoc($query)) $assoc_id[] = $list_sw['id']; $all = count ($assoc_id); echo "
Top $setup[top_num] files:
Sorted: $sortslink
"; if (!isset($page)) $page=1; $n = 0; $pages = ceil($all/$onpage); if(!$pages) $pages = 1; if ($page) $n = ($onpage*$page)-$onpage; if ($all == 0) echo "

Empty :(

"; for ($i = 1; $i<=$onpage; $i++) { if (!isset($assoc_id[$n])) { $n++; continue; } if(is_integer($n / 2)) $row = "
"; else $row = "
"; $file_info = mysql_fetch_assoc(mysql_query("SELECT * FROM `files` WHERE `id` = '".$assoc_id[$n]."'")); $fileid= $file_info['id']; $file_size= $file_info['size']; $rev = strrev ($filename); $exp = explode (".", $rev); $true = strrev ($exp[0]); $trueext = strtolower ($true); if($file_size < 1024) $file_size = "(".$file_size."kb)"; $filtime2 = $file_info['timeupload']+(3600*24*$setup['day_new']); if($filtime2>=$time) $new_info = "(New)"; if($file_size < 1048576 and $file_size >= 1024) $file_size = '('.round($file_size/1024, 2).'Mb)'; $filename = $file_info['name']; $basename = basename($file_info['path']); $ex = pathinfo($file_info['path']); $ex = $ex['extension']; $ext = strtolower($ex); $name_file = str_replace(".".$ex,"",$basename); if(!file_exists("ext/$ext.png")) $ico = "\"*\"/"; else $ico = "\"*\"/"; echo $row; print "".$ico."".$filename."$file_size $new_info
"; echo '
'; $n++; } echo "
"; echo "- Downloads
"; } ////////////////////Partners if($a=='partners') { echo "
Partners!
"; echo 'None at the moment! If you want to be partners, email me - leroux@landofwap.mobi'; echo "

"; echo 'Home'; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////Get stats from database $all_files = 0; $all_size = 0; $all_size = mysql_fetch_array(mysql_query("SELECT SUM(`size`) FROM `files` WHERE `size` > '0';")); if($all_size[0] < 1024) $all_size[0] = "".round($all_size[0])." Kb"; $all_files = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `size` > '0';")); $all_loads = mysql_fetch_array(mysql_query("SELECT SUM(`loads`) FROM `files` WHERE `size` > '0';")); $today_loads = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `timeload` > '".($time - (3600*24))."';")); if(!$today_loads[0]) $today_loads[0] = 0; $new_all_files = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `timeupload` > '".($time-(3600*24*2))."' AND `size` > '0';")); $max_online = mysql_fetch_array(mysql_query("SELECT `time` FROM `online` WHERE `id` = '1';")); ///////////////////////////Footer addvisitor(); echo '
Total Hits: '.$setup['counter'].'
Guests Online: '.onlinecounter().'
'; $norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM files")); echo "Total Files: $norm[0]
"; echo "Total downloads made: $all_loads[0]
"; echo "Most online: $max_online[0]
"; echo "
"; echo 'Partners'; echo "
"; echo "Support Us - "; $xfile = @file("toplists.txt"); $random_num = rand (0,count($xfile)-1); $udata = explode("::",$xfile[$random_num]); echo "$udata[1]

"; echo ''; echo ' '; @mysql_close(); @ob_end_flush(); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>